package com.mashibing.juc.c_000;

/**
 * @ClassName T02_HowToCreateThread
 * @Description 怎样创建线程
 * @Author xiongwei.wu
 * @Date 2021/6/30 16:03
 **/
public class T02_HowToCreateThread {

    static class MyThread extends Thread {
        @Override
        public void run() {
            System.out.println("hello myThread!!!");
        }
    }

    static class MyRunnable implements Runnable {

        @Override
        public void run() {
            System.out.println("hello myRunnable!!!");
        }
    }

    public static void main(String[] args) {
        new MyThread().start();
        new Thread(new MyRunnable()).start();
        new Thread(() -> {
            System.out.println("hello lambda!!!");
        }).start();
    }
}
